package demo4.controller;

import demo4.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class UserConttroller {
    @Autowired
    private IUserService userService;
    public void doLogin(){
        System.out.println("UserController:begin login");
        System.out.println("接收用户名和密码");
        String username = "张三";
        String password = "123456";
        boolean login = userService.login(username, password);
        if(login){
            System.out.println("Login is WIN");
        }else{
            System.out.println("Login loster");
        }
    }
}
